
package cn.ruituo.service;

import cn.ruituo.dao.GradeDao;
import cn.ruituo.entity.Grade;
import cn.ruituo.entity.Grade2;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional(readOnly = true)
@Cacheable
@CacheConfig(cacheNames = "grade",keyGenerator = "keyg")
public class GradeService {
    @Autowired
   private GradeDao dao;
   public List<Grade> findALL(){

           List<Grade> all = dao.findALL();
            return all;

   }
}

